Avoid some compiler warnings and remove obsolete code. (#339540)
authorMathias Hasselmann <hasselmm@src.gnome.org>
Wed, 19 Dec 2007 22:57:01 +0000 (22:57 +0000)
committerMathias Hasselmann <hasselmm@src.gnome.org>
Wed, 19 Dec 2007 22:57:01 +0000 (22:57 +0000)
* gtk/gtkcalendar.c: Change week and year variable in
calendar_paint_week_numbers from gint to guint. Remove obsolete "#if
0" block from calendar_paint_day: The feature in question is handled
few lines above. Cast data returned by gtk_selection_data_get_text()
to (gchar*) in gtk_calendar_drag_data_received.

svn path=/trunk/; revision=19201

ChangeLog
gtk/gtkcalendar.c

index 566a7dd166777a78a85303d8fee9115fbe176e47..7e573a38a9bf210ca1830a367a067973bda5cbe4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2007-12-17  Mathias Hasselmann  <mathias@openismus.com>
+
+       Avoid some compiler warnings and remove obsolete code. (#339540)
+
+       * gtk/gtkcalendar.c: Change week and year variable in
+       calendar_paint_week_numbers from gint to guint. Remove obsolete "#if
+       0" block from calendar_paint_day: The feature in question is handled
+       few lines above. Cast data returned by gtk_selection_data_get_text()
+       to (gchar*) in gtk_calendar_drag_data_received.
+
 2007-12-19 17:05:31  Tim Janik  <timj@imendio.com>
 
        * modules/other/Makefile.am: include Makefile.decl to unbreak test rules.
index 61a832ac3f168028486b26453f413d841ba2183f..e5b11ae6dfe568d130fe4ac0c57b25ba7026c612 100644 (file)
@@ -2008,10 +2008,11 @@ calendar_paint_week_numbers (GtkCalendar *calendar)
   GtkWidget *widget = GTK_WIDGET (calendar);
   GtkCalendarPrivate *priv = GTK_CALENDAR_GET_PRIVATE (calendar);
   cairo_t *cr;
-  gint row, week = 0, year;
-  gint x_loc;
+
+  guint week = 0, year;
+  gint row, x_loc, y_loc;
+  gint day_height;
   char buffer[32];
-  gint y_loc, day_height;
   PangoLayout *layout;
   PangoRectangle logical_rect;
   gint focus_padding;
@@ -2233,10 +2234,6 @@ calendar_paint_day (GtkCalendar *calendar,
       gtk_paint_focus (widget->style, 
                       priv->main_win,
                       state,
-#if 0
-                      (calendar->selected_day == day) 
-                         ? GTK_STATE_SELECTED : GTK_STATE_NORMAL, 
-#endif
                       NULL, widget, "calendar-day",
                       day_rect.x,     day_rect.y, 
                       day_rect.width, day_rect.height);
@@ -3075,7 +3072,8 @@ gtk_calendar_drag_data_received (GtkWidget        *widget,
        * supposed to call drag_status, not actually paste in the
        * data.
        */
-      str = gtk_selection_data_get_text (selection_data);
+      str = (gchar*) gtk_selection_data_get_text (selection_data);
+
       if (str) 
        {
          date = g_date_new ();
@@ -3094,7 +3092,7 @@ gtk_calendar_drag_data_received (GtkWidget        *widget,
     }
 
   date = g_date_new ();
-  str = gtk_selection_data_get_text (selection_data);
+  str = (gchar*) gtk_selection_data_get_text (selection_data);
   if (str) 
     {
       g_date_set_parse (date, str);